﻿using System;
using System.Web.Mvc;
using Toast.Core;

namespace Toast.Attributes
{
    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
    public class ContentAttribute : ActionFilterAttribute
    {
        public ContentAttribute(InjectAt injectAt, string reference)
        {
            RequestContentTable.Contents.Add(ContentTypeResolver.Discover(reference, injectAt));
        }
    }
}